<?php defined('BASEPATH') OR exit('No direct script access allowed');

require APPPATH.'/libraries/REST_Controller.php';

class En extends REST_Controller{
    
    function __construct(){
        parent::__construct();
        //$this->load->model('user','',TRUE);
        //$this->load->model(array('department_model','user_model','staff_model'));

    }
    
    public function stading_get(){
        $file = fopen($this->config->item('craw_base')."json_bangxephang.txt","r");
        $data = fread($file,filesize($this->config->item('craw_base')."json_bangxephang.txt"));
        fclose($file);
        if($data){
            $this->response(array('result'=>$data));
        }else{
            $this->response(array('error' => 'Could not be found'), 404);
        }
        //$this->response(array('result'=>true));
    }
    
    public function bets_get(){
        $file = fopen($this->config->item('craw_base')."json_tisokeo.txt","r");
        $data = fread($file,filesize($this->config->item('craw_base')."json_bangxephang.txt"));
        fclose($file);
        if($data){
            $this->response(array('result'=>$data));
        }else{
            $this->response(array('error' => 'Could not be found'), 404);
        }
    }
        
}

?>